<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>MediaSessionConnector (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
    try {
        if (location.href.indexOf('is-external=true') == -1) {
            parent.document.title="MediaSessionConnector (ExoPlayer library)";
        }
    }
    catch(err) {
    }
//-->
var data = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":42,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":42,"i21":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">com.google.android.exoplayer2.ext.mediasession</a></div>
<h2 title="Class MediaSessionConnector" class="title">Class MediaSessionConnector</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<pre>public final class <span class="typeNameLabel">MediaSessionConnector</span>
extends <a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></pre>
<div class="block">Connects a <code>MediaSessionCompat</code> to a <a href="../../Player.html" title="interface in com.google.android.exoplayer2"><code>Player</code></a>.

 <p>This connector does <em>not</em> call <code>MediaSessionCompat.setActive(boolean)</code>, and so
 application code is responsible for making the session active when desired. A session must be
 active for transport controls to be displayed (e.g. on the lock screen) and for it to receive
 media button events.

 <p>The connector listens for actions sent by the media session's controller and implements these
 actions by calling appropriate player methods. The playback state of the media session is
 automatically synced with the player. The connector can also be optionally extended by providing
 various collaborators:

 <ul>
   <li>Actions to initiate media playback (<code>PlaybackStateCompat#ACTION_PREPARE_*</code> and <code>
       PlaybackStateCompat#ACTION_PLAY_*</code>) can be handled by a <a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.PlaybackPreparer</code></a> passed to
       <a href="#setPlaybackPreparer(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.PlaybackPreparer)"><code>setPlaybackPreparer(PlaybackPreparer)</code></a>.
   <li>Custom actions can be handled by passing one or more <a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.CustomActionProvider</code></a>s to
       <a href="#setCustomActionProviders(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CustomActionProvider...)"><code>setCustomActionProviders(CustomActionProvider...)</code></a>.
   <li>To enable a media queue and navigation within it, you can set a <a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueNavigator</code></a> by
       calling <a href="#setQueueNavigator(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueNavigator)"><code>setQueueNavigator(QueueNavigator)</code></a>. Use of <a href="TimelineQueueNavigator.html" title="class in com.google.android.exoplayer2.ext.mediasession"><code>TimelineQueueNavigator</code></a>
       is recommended for most use cases.
   <li>To enable editing of the media queue, you can set a <a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueEditor</code></a> by calling <a href="#setQueueEditor(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueEditor)"><code>setQueueEditor(QueueEditor)</code></a>.
   <li>A <a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.MediaButtonEventHandler</code></a> can be set by calling <a href="#setMediaButtonEventHandler(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaButtonEventHandler)"><code>setMediaButtonEventHandler(MediaButtonEventHandler)</code></a>. By default media button events are
       handled by <code>MediaSessionCompat.Callback.onMediaButtonEvent(Intent)</code>.
   <li>An <a href="../../util/ErrorMessageProvider.html" title="interface in com.google.android.exoplayer2.util"><code>ErrorMessageProvider</code></a> for providing human readable error messages and
       corresponding error codes can be set by calling <a href="#setErrorMessageProvider(com.google.android.exoplayer2.util.ErrorMessageProvider)"><code>setErrorMessageProvider(ErrorMessageProvider)</code></a>.
   <li>A <a href="MediaSessionConnector.MediaMetadataProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.MediaMetadataProvider</code></a> can be set by calling <a href="#setMediaMetadataProvider(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaMetadataProvider)"><code>setMediaMetadataProvider(MediaMetadataProvider)</code></a>. By default the <a href="MediaSessionConnector.DefaultMediaMetadataProvider.html" title="class in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.DefaultMediaMetadataProvider</code></a> is used.
 </ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="nested.class.summary">
<!--   -->
</a>
<h3>Nested Class Summary</h3>
<table class="memberSummary">
<caption><span>Nested Classes</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.CaptionCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CaptionCallback</a></span></code></th>
<td class="colLast">
<div class="block">Handles requests for enabling or disabling captions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.CommandReceiver.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CommandReceiver</a></span></code></th>
<td class="colLast">
<div class="block">Receiver of media commands sent by a media controller.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CustomActionProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides a <code>PlaybackStateCompat.CustomAction</code> to be published and handles the action when
 sent by a media controller.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static class&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.DefaultMediaMetadataProvider.html" title="class in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.DefaultMediaMetadataProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides a default <code>MediaMetadataCompat</code> with properties and extras taken from the <code>MediaDescriptionCompat</code> of the <code>MediaSessionCompat.QueueItem</code> of the active queue item.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaButtonEventHandler</a></span></code></th>
<td class="colLast">
<div class="block">Handles a media button event.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.MediaMetadataProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaMetadataProvider</a></span></code></th>
<td class="colLast">
<div class="block">Provides a <code>MediaMetadataCompat</code> for a given player state.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.PlaybackActions.html" title="annotation in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.PlaybackActions</a></span></code></th>
<td class="colLast">
<div class="block">Playback actions supported by the connector.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.PlaybackPreparer</a></span></code></th>
<td class="colLast">
<div class="block">Interface to which playback preparation and play actions are delegated.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueEditor</a></span></code></th>
<td class="colLast">
<div class="block">Handles media session queue edits.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueNavigator</a></span></code></th>
<td class="colLast">
<div class="block">Handles queue navigation actions, and updates the media session queue by calling <code>
 MediaSessionCompat.setQueue()</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static interface&nbsp;</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="MediaSessionConnector.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.RatingCallback</a></span></code></th>
<td class="colLast">
<div class="block">Callback receiving a user rating for the active media item.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- =========== FIELD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.summary">
<!--   -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Field</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ACTION_SET_PLAYBACK_SPEED">ACTION_SET_PLAYBACK_SPEED</a></span></code></th>
<td class="colLast">
<div class="block">Indicates this session supports the set playback speed command.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#ALL_PLAYBACK_ACTIONS">ALL_PLAYBACK_ACTIONS</a></span></code></th>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#DEFAULT_PLAYBACK_ACTIONS">DEFAULT_PLAYBACK_ACTIONS</a></span></code></th>
<td class="colLast">
<div class="block">The default playback actions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#EXTRAS_SPEED">EXTRAS_SPEED</a></span></code></th>
<td class="colLast">
<div class="block">The name of the <code>PlaybackStateCompat</code> float extra with the value of <code>
 Player.getPlaybackParameters().speed</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>android.support.v4.media.session.MediaSessionCompat</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#mediaSession">mediaSession</a></span></code></th>
<td class="colLast">
<div class="block">The wrapped <code>MediaSessionCompat</code>.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.summary">
<!--   -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Constructor</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr class="altColor">
<th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E(android.support.v4.media.session.MediaSessionCompat)">MediaSessionConnector</a></span>&#8203;(android.support.v4.media.session.MediaSessionCompat&nbsp;mediaSession)</code></th>
<td class="colLast">
<div class="block">Creates an instance.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
<!-- ========== METHOD SUMMARY =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!--   -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invalidateMediaSessionMetadata()">invalidateMediaSessionMetadata</a></span>()</code></th>
<td class="colLast">
<div class="block">Updates the metadata of the media session.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invalidateMediaSessionPlaybackState()">invalidateMediaSessionPlaybackState</a></span>()</code></th>
<td class="colLast">
<div class="block">Updates the playback state of the media session.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#invalidateMediaSessionQueue()">invalidateMediaSessionQueue</a></span>()</code></th>
<td class="colLast">
<div class="block">Updates the queue of the media session by calling <a href="MediaSessionConnector.QueueNavigator.html#onTimelineChanged(com.google.android.exoplayer2.Player)"><code>MediaSessionConnector.QueueNavigator.onTimelineChanged(Player)</code></a>.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#registerCustomCommandReceiver(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CommandReceiver)">registerCustomCommandReceiver</a></span>&#8203;(<a href="MediaSessionConnector.CommandReceiver.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CommandReceiver</a>&nbsp;commandReceiver)</code></th>
<td class="colLast">
<div class="block">Registers a custom command receiver for responding to commands delivered via <code>MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver)</code>.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCaptionCallback(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CaptionCallback)">setCaptionCallback</a></span>&#8203;(<a href="MediaSessionConnector.CaptionCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CaptionCallback</a>&nbsp;captionCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.CaptionCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.CaptionCallback</code></a> to handle requests to enable or disable captions.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)">setControlDispatcher</a></span>&#8203;(<a href="../../ControlDispatcher.html" title="interface in com.google.android.exoplayer2">ControlDispatcher</a>&nbsp;controlDispatcher)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="../../ControlDispatcher.html" title="interface in com.google.android.exoplayer2"><code>ControlDispatcher</code></a>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomActionProviders(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CustomActionProvider...)">setCustomActionProviders</a></span>&#8203;(<a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CustomActionProvider</a>...&nbsp;customActionProviders)</code></th>
<td class="colLast">
<div class="block">Sets custom action providers.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomErrorMessage(java.lang.CharSequence)">setCustomErrorMessage</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message)</code></th>
<td class="colLast">
<div class="block">Sets a custom error on the session.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomErrorMessage(java.lang.CharSequence,int)">setCustomErrorMessage</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message,
                     int&nbsp;code)</code></th>
<td class="colLast">
<div class="block">Sets a custom error on the session.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setCustomErrorMessage(java.lang.CharSequence,int,android.os.Bundle)">setCustomErrorMessage</a></span>&#8203;(<a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message,
                     int&nbsp;code,
                     <a href="https://developer.android.com/reference/android/os/Bundle.html" title="class or interface in android.os" class="externalLink" target="_top">Bundle</a>&nbsp;extras)</code></th>
<td class="colLast">
<div class="block">Sets a custom error on the session.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setEnabledPlaybackActions(long)">setEnabledPlaybackActions</a></span>&#8203;(long&nbsp;enabledPlaybackActions)</code></th>
<td class="colLast">
<div class="block">Sets the enabled playback actions.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setErrorMessageProvider(com.google.android.exoplayer2.util.ErrorMessageProvider)">setErrorMessageProvider</a></span>&#8203;(<a href="../../util/ErrorMessageProvider.html" title="interface in com.google.android.exoplayer2.util">ErrorMessageProvider</a>&lt;? super <a href="../../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a>&gt;&nbsp;errorMessageProvider)</code></th>
<td class="colLast">
<div class="block">Sets the optional <a href="../../util/ErrorMessageProvider.html" title="interface in com.google.android.exoplayer2.util"><code>ErrorMessageProvider</code></a>.</div>
</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setFastForwardIncrementMs(int)">setFastForwardIncrementMs</a></span>&#8203;(int&nbsp;fastForwardMs)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)"><code>setControlDispatcher(ControlDispatcher)</code></a> with <a href="../../DefaultControlDispatcher.html#%3Cinit%3E(long,long)"><code>DefaultControlDispatcher(long, long)</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaButtonEventHandler(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaButtonEventHandler)">setMediaButtonEventHandler</a></span>&#8203;(<a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaButtonEventHandler</a>&nbsp;mediaButtonEventHandler)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.MediaButtonEventHandler</code></a>.</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setMediaMetadataProvider(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaMetadataProvider)">setMediaMetadataProvider</a></span>&#8203;(<a href="MediaSessionConnector.MediaMetadataProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaMetadataProvider</a>&nbsp;mediaMetadataProvider)</code></th>
<td class="colLast">
<div class="block">Sets a provider of metadata to be published to the media session.</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlaybackPreparer(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.PlaybackPreparer)">setPlaybackPreparer</a></span>&#8203;(<a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.PlaybackPreparer</a>&nbsp;playbackPreparer)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.PlaybackPreparer</code></a>.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setPlayer(com.google.android.exoplayer2.Player)">setPlayer</a></span>&#8203;(<a href="../../Player.html" title="interface in com.google.android.exoplayer2">Player</a>&nbsp;player)</code></th>
<td class="colLast">
<div class="block">Sets the player to be connected to the media session.</div>
</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setQueueEditor(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueEditor)">setQueueEditor</a></span>&#8203;(<a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueEditor</a>&nbsp;queueEditor)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueEditor</code></a> to handle queue edits sent by the media controller.</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setQueueNavigator(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueNavigator)">setQueueNavigator</a></span>&#8203;(<a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueNavigator</a>&nbsp;queueNavigator)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueNavigator</code></a> to handle queue navigation actions <code>ACTION_SKIP_TO_NEXT</code>,
 <code>ACTION_SKIP_TO_PREVIOUS</code> and <code>ACTION_SKIP_TO_QUEUE_ITEM</code>.</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRatingCallback(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.RatingCallback)">setRatingCallback</a></span>&#8203;(<a href="MediaSessionConnector.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.RatingCallback</a>&nbsp;ratingCallback)</code></th>
<td class="colLast">
<div class="block">Sets the <a href="MediaSessionConnector.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.RatingCallback</code></a> to handle user ratings.</div>
</td>
</tr>
<tr id="i20" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRewindIncrementMs(int)">setRewindIncrementMs</a></span>&#8203;(int&nbsp;rewindMs)</code></th>
<td class="colLast">
<div class="block"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)"><code>setControlDispatcher(ControlDispatcher)</code></a> with <a href="../../DefaultControlDispatcher.html#%3Cinit%3E(long,long)"><code>DefaultControlDispatcher(long, long)</code></a> instead.</div>
</div>
</td>
</tr>
<tr id="i21" class="rowColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#unregisterCustomCommandReceiver(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CommandReceiver)">unregisterCustomCommandReceiver</a></span>&#8203;(<a href="MediaSessionConnector.CommandReceiver.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CommandReceiver</a>&nbsp;commandReceiver)</code></th>
<td class="colLast">
<div class="block">Unregisters a previously registered custom command receiver.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a id="methods.inherited.from.class.java.lang.Object">
<!--   -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="https://developer.android.com/reference/java/lang/Object.html" title="class or interface in java.lang" class="externalLink" target="_top">Object</a></h3>
<code><a href="https://developer.android.com/reference/java/lang/Object.html#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://developer.android.com/reference/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink" target="_top">wait</a></code></li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="field.detail">
<!--   -->
</a>
<h3>Field Detail</h3>
<a id="ACTION_SET_PLAYBACK_SPEED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ACTION_SET_PLAYBACK_SPEED</h4>
<pre>public static final&nbsp;long ACTION_SET_PLAYBACK_SPEED</pre>
<div class="block">Indicates this session supports the set playback speed command.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.ACTION_SET_PLAYBACK_SPEED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="ALL_PLAYBACK_ACTIONS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>ALL_PLAYBACK_ACTIONS</h4>
<pre>public static final&nbsp;long ALL_PLAYBACK_ACTIONS</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.ALL_PLAYBACK_ACTIONS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="DEFAULT_PLAYBACK_ACTIONS">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>DEFAULT_PLAYBACK_ACTIONS</h4>
<pre>public static final&nbsp;long DEFAULT_PLAYBACK_ACTIONS</pre>
<div class="block">The default playback actions.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.DEFAULT_PLAYBACK_ACTIONS">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="EXTRAS_SPEED">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EXTRAS_SPEED</h4>
<pre>public static final&nbsp;<a href="https://developer.android.com/reference/java/lang/String.html" title="class or interface in java.lang" class="externalLink" target="_top">String</a> EXTRAS_SPEED</pre>
<div class="block">The name of the <code>PlaybackStateCompat</code> float extra with the value of <code>
 Player.getPlaybackParameters().speed</code>.</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../constant-values.html#com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.EXTRAS_SPEED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
<a id="mediaSession">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>mediaSession</h4>
<pre>public final&nbsp;android.support.v4.media.session.MediaSessionCompat mediaSession</pre>
<div class="block">The wrapped <code>MediaSessionCompat</code>.</div>
</li>
</ul>
</li>
</ul>
</section>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="constructor.detail">
<!--   -->
</a>
<h3>Constructor Detail</h3>
<a id="&lt;init&gt;(android.support.v4.media.session.MediaSessionCompat)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MediaSessionConnector</h4>
<pre>public&nbsp;MediaSessionConnector&#8203;(android.support.v4.media.session.MediaSessionCompat&nbsp;mediaSession)</pre>
<div class="block">Creates an instance.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaSession</code> - The <code>MediaSessionCompat</code> to connect to.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
<!-- ============ METHOD DETAIL ========== -->
<section role="region">
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!--   -->
</a>
<h3>Method Detail</h3>
<a id="setPlayer(com.google.android.exoplayer2.Player)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlayer</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setPlayer&#8203;(@Nullable
                      <a href="../../Player.html" title="interface in com.google.android.exoplayer2">Player</a>&nbsp;player)</pre>
<div class="block">Sets the player to be connected to the media session. Must be called on the same thread that is
 used to access the player.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>player</code> - The player to be connected to the <code>MediaSession</code>, or <code>null</code> to
     disconnect the current player.</dd>
</dl>
</li>
</ul>
<a id="setPlaybackPreparer(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.PlaybackPreparer)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setPlaybackPreparer</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setPlaybackPreparer&#8203;(@Nullable
                                <a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.PlaybackPreparer</a>&nbsp;playbackPreparer)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.PlaybackPreparer</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>playbackPreparer</code> - The <a href="MediaSessionConnector.PlaybackPreparer.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.PlaybackPreparer</code></a>.</dd>
</dl>
</li>
</ul>
<a id="setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setControlDispatcher</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setControlDispatcher&#8203;(<a href="../../ControlDispatcher.html" title="interface in com.google.android.exoplayer2">ControlDispatcher</a>&nbsp;controlDispatcher)</pre>
<div class="block">Sets the <a href="../../ControlDispatcher.html" title="interface in com.google.android.exoplayer2"><code>ControlDispatcher</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>controlDispatcher</code> - The <a href="../../ControlDispatcher.html" title="interface in com.google.android.exoplayer2"><code>ControlDispatcher</code></a>.</dd>
</dl>
</li>
</ul>
<a id="setMediaButtonEventHandler(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaButtonEventHandler)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaButtonEventHandler</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMediaButtonEventHandler&#8203;(@Nullable
                                       <a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaButtonEventHandler</a>&nbsp;mediaButtonEventHandler)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.MediaButtonEventHandler</code></a>. Pass <code>null</code> if the media button event should be
 handled by <code>MediaSessionCompat.Callback.onMediaButtonEvent(Intent)</code>.

 <p>Please note that prior to API 21 MediaButton events are not delivered to the <code>MediaSessionCompat</code>. Instead they are delivered as key events (see <a href="https://developer.android.com/guide/topics/media-apps/mediabuttons">'Responding to media
 buttons'</a>). In an <a href="https://developer.android.com/reference/android/app/Activity.html" title="class or interface in android.app" class="externalLink" target="_top"><code>Activity</code></a>, media button events arrive at the
 <a href="https://developer.android.com/reference/android/app/Activity.html#dispatchKeyEvent(android.view.KeyEvent)" title="class or interface in android.app" class="externalLink" target="_top"><code>Activity.dispatchKeyEvent(KeyEvent)</code></a> method.

 <p>If you are running the player in a foreground service (prior to API 21), you can create an
 intent filter and handle the <code>android.intent.action.MEDIA_BUTTON</code> action yourself. See <a href="https://developer.android.com/reference/androidx/media/session/MediaButtonReceiver#service-handling-action_media_button">
 Service handling ACTION_MEDIA_BUTTON</a> for more information.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaButtonEventHandler</code> - The <a href="MediaSessionConnector.MediaButtonEventHandler.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.MediaButtonEventHandler</code></a>, or null to let the event be
     handled by <code>MediaSessionCompat.Callback.onMediaButtonEvent(Intent)</code>.</dd>
</dl>
</li>
</ul>
<a id="setEnabledPlaybackActions(long)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setEnabledPlaybackActions</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setEnabledPlaybackActions&#8203;(long&nbsp;enabledPlaybackActions)</pre>
<div class="block">Sets the enabled playback actions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>enabledPlaybackActions</code> - The enabled playback actions.</dd>
</dl>
</li>
</ul>
<a id="setRewindIncrementMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRewindIncrementMs</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;void&nbsp;setRewindIncrementMs&#8203;(int&nbsp;rewindMs)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)"><code>setControlDispatcher(ControlDispatcher)</code></a> with <a href="../../DefaultControlDispatcher.html#%3Cinit%3E(long,long)"><code>DefaultControlDispatcher(long, long)</code></a> instead.</div>
</div>
</li>
</ul>
<a id="setFastForwardIncrementMs(int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setFastForwardIncrementMs</h4>
<pre class="methodSignature"><a href="https://developer.android.com/reference/java/lang/Deprecated.html" title="class or interface in java.lang" class="externalLink" target="_top">@Deprecated</a>
public&nbsp;void&nbsp;setFastForwardIncrementMs&#8203;(int&nbsp;fastForwardMs)</pre>
<div class="deprecationBlock"><span class="deprecatedLabel">Deprecated.</span>
<div class="deprecationComment">Use <a href="#setControlDispatcher(com.google.android.exoplayer2.ControlDispatcher)"><code>setControlDispatcher(ControlDispatcher)</code></a> with <a href="../../DefaultControlDispatcher.html#%3Cinit%3E(long,long)"><code>DefaultControlDispatcher(long, long)</code></a> instead.</div>
</div>
</li>
</ul>
<a id="setErrorMessageProvider(com.google.android.exoplayer2.util.ErrorMessageProvider)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setErrorMessageProvider</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setErrorMessageProvider&#8203;(@Nullable
                                    <a href="../../util/ErrorMessageProvider.html" title="interface in com.google.android.exoplayer2.util">ErrorMessageProvider</a>&lt;? super <a href="../../ExoPlaybackException.html" title="class in com.google.android.exoplayer2">ExoPlaybackException</a>&gt;&nbsp;errorMessageProvider)</pre>
<div class="block">Sets the optional <a href="../../util/ErrorMessageProvider.html" title="interface in com.google.android.exoplayer2.util"><code>ErrorMessageProvider</code></a>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>errorMessageProvider</code> - The error message provider.</dd>
</dl>
</li>
</ul>
<a id="setQueueNavigator(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueNavigator)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQueueNavigator</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setQueueNavigator&#8203;(@Nullable
                              <a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueNavigator</a>&nbsp;queueNavigator)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.QueueNavigator.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueNavigator</code></a> to handle queue navigation actions <code>ACTION_SKIP_TO_NEXT</code>,
 <code>ACTION_SKIP_TO_PREVIOUS</code> and <code>ACTION_SKIP_TO_QUEUE_ITEM</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>queueNavigator</code> - The queue navigator.</dd>
</dl>
</li>
</ul>
<a id="setQueueEditor(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.QueueEditor)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setQueueEditor</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setQueueEditor&#8203;(@Nullable
                           <a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.QueueEditor</a>&nbsp;queueEditor)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.QueueEditor.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.QueueEditor</code></a> to handle queue edits sent by the media controller.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>queueEditor</code> - The queue editor.</dd>
</dl>
</li>
</ul>
<a id="setRatingCallback(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.RatingCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setRatingCallback</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setRatingCallback&#8203;(@Nullable
                              <a href="MediaSessionConnector.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.RatingCallback</a>&nbsp;ratingCallback)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.RatingCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.RatingCallback</code></a> to handle user ratings.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>ratingCallback</code> - The rating callback.</dd>
</dl>
</li>
</ul>
<a id="setCaptionCallback(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CaptionCallback)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCaptionCallback</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCaptionCallback&#8203;(@Nullable
                               <a href="MediaSessionConnector.CaptionCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CaptionCallback</a>&nbsp;captionCallback)</pre>
<div class="block">Sets the <a href="MediaSessionConnector.CaptionCallback.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.CaptionCallback</code></a> to handle requests to enable or disable captions.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>captionCallback</code> - The caption callback.</dd>
</dl>
</li>
</ul>
<a id="setCustomErrorMessage(java.lang.CharSequence)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomErrorMessage</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCustomErrorMessage&#8203;(@Nullable
                                  <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message)</pre>
<div class="block">Sets a custom error on the session.

 <p>This sets the error code via <code>PlaybackStateCompat.Builder.setErrorMessage(int,
 CharSequence)</code>. By default, the error code will be set to <code>PlaybackStateCompat.ERROR_CODE_APP_ERROR</code>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>message</code> - The error string to report or <code>null</code> to clear the error.</dd>
</dl>
</li>
</ul>
<a id="setCustomErrorMessage(java.lang.CharSequence,int)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomErrorMessage</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCustomErrorMessage&#8203;(@Nullable
                                  <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message,
                                  int&nbsp;code)</pre>
<div class="block">Sets a custom error on the session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>message</code> - The error string to report or <code>null</code> to clear the error.</dd>
<dd><code>code</code> - The error code to report. Ignored when <code>message</code> is <code>null</code>.</dd>
</dl>
</li>
</ul>
<a id="setCustomErrorMessage(java.lang.CharSequence,int,android.os.Bundle)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomErrorMessage</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCustomErrorMessage&#8203;(@Nullable
                                  <a href="https://developer.android.com/reference/java/lang/CharSequence.html" title="class or interface in java.lang" class="externalLink" target="_top">CharSequence</a>&nbsp;message,
                                  int&nbsp;code,
                                  @Nullable
                                  <a href="https://developer.android.com/reference/android/os/Bundle.html" title="class or interface in android.os" class="externalLink" target="_top">Bundle</a>&nbsp;extras)</pre>
<div class="block">Sets a custom error on the session.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>message</code> - The error string to report or <code>null</code> to clear the error.</dd>
<dd><code>code</code> - The error code to report. Ignored when <code>message</code> is <code>null</code>.</dd>
<dd><code>extras</code> - Extras to include in reported <code>PlaybackStateCompat</code>.</dd>
</dl>
</li>
</ul>
<a id="setCustomActionProviders(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CustomActionProvider...)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCustomActionProviders</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setCustomActionProviders&#8203;(@Nullable
                                     <a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CustomActionProvider</a>...&nbsp;customActionProviders)</pre>
<div class="block">Sets custom action providers. The order of the <a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.CustomActionProvider</code></a>s determines the
 order in which the actions are published.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>customActionProviders</code> - The custom action providers, or null to remove all existing custom
     action providers.</dd>
</dl>
</li>
</ul>
<a id="setMediaMetadataProvider(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.MediaMetadataProvider)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setMediaMetadataProvider</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;setMediaMetadataProvider&#8203;(@Nullable
                                     <a href="MediaSessionConnector.MediaMetadataProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.MediaMetadataProvider</a>&nbsp;mediaMetadataProvider)</pre>
<div class="block">Sets a provider of metadata to be published to the media session. Pass <code>null</code> if no
 metadata should be published.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mediaMetadataProvider</code> - The provider of metadata to publish, or <code>null</code> if no
     metadata should be published.</dd>
</dl>
</li>
</ul>
<a id="invalidateMediaSessionMetadata()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invalidateMediaSessionMetadata</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;invalidateMediaSessionMetadata()</pre>
<div class="block">Updates the metadata of the media session.

 <p>Apps normally only need to call this method when the backing data for a given media item has
 changed and the metadata should be updated immediately.

 <p>The <code>MediaMetadataCompat</code> which is published to the session is obtained by calling
 <a href="MediaSessionConnector.MediaMetadataProvider.html#getMetadata(com.google.android.exoplayer2.Player)"><code>MediaSessionConnector.MediaMetadataProvider.getMetadata(Player)</code></a>.</div>
</li>
</ul>
<a id="invalidateMediaSessionPlaybackState()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invalidateMediaSessionPlaybackState</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;invalidateMediaSessionPlaybackState()</pre>
<div class="block">Updates the playback state of the media session.

 <p>Apps normally only need to call this method when the custom actions provided by a <a href="MediaSessionConnector.CustomActionProvider.html" title="interface in com.google.android.exoplayer2.ext.mediasession"><code>MediaSessionConnector.CustomActionProvider</code></a> changed and the playback state needs to be updated immediately.</div>
</li>
</ul>
<a id="invalidateMediaSessionQueue()">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>invalidateMediaSessionQueue</h4>
<pre class="methodSignature">public final&nbsp;void&nbsp;invalidateMediaSessionQueue()</pre>
<div class="block">Updates the queue of the media session by calling <a href="MediaSessionConnector.QueueNavigator.html#onTimelineChanged(com.google.android.exoplayer2.Player)"><code>MediaSessionConnector.QueueNavigator.onTimelineChanged(Player)</code></a>.

 <p>Apps normally only need to call this method when the backing data for a given queue item has
 changed and the queue should be updated immediately.</div>
</li>
</ul>
<a id="registerCustomCommandReceiver(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CommandReceiver)">
<!--   -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>registerCustomCommandReceiver</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;registerCustomCommandReceiver&#8203;(@Nullable
                                          <a href="MediaSessionConnector.CommandReceiver.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CommandReceiver</a>&nbsp;commandReceiver)</pre>
<div class="block">Registers a custom command receiver for responding to commands delivered via <code>MediaSessionCompat.Callback.onCommand(String, Bundle, ResultReceiver)</code>.

 <p>Commands are only dispatched to this receiver when a player is connected.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>commandReceiver</code> - The command receiver to register.</dd>
</dl>
</li>
</ul>
<a id="unregisterCustomCommandReceiver(com.google.android.exoplayer2.ext.mediasession.MediaSessionConnector.CommandReceiver)">
<!--   -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>unregisterCustomCommandReceiver</h4>
<pre class="methodSignature">public&nbsp;void&nbsp;unregisterCustomCommandReceiver&#8203;(@Nullable
                                            <a href="MediaSessionConnector.CommandReceiver.html" title="interface in com.google.android.exoplayer2.ext.mediasession">MediaSessionConnector.CommandReceiver</a>&nbsp;commandReceiver)</pre>
<div class="block">Unregisters a previously registered custom command receiver.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>commandReceiver</code> - The command receiver to unregister.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!--   -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li><a href="#nested.class.summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
